<template>
  <div class="label-list">
    <a
      v-for="(item, index) in list"
      :key="index"
      href="javascript:;" 
      @click="select(item)"
    >{{ item }}</a>
  </div>
</template>

<script>
export default {
  name: 'LabelList',
  props: {
    list: Array
  },
  methods: {
    select (item) {
      this.$emit('onSelect', item)
    }
  }
}
</script>

<style lang="scss" scoped>
.label-list {
  @include flex(row);
  flex-wrap: wrap;
  a {
    padding: 10px;
    margin-right: 20px;
    color: #999999;
  }
}
</style>
